\(\int \frac {1}{x^3 (x-x^3)} \, dx\) [34]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [C] (verified)
   Fricas [B] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 13, antiderivative size = 15 \[ \int \frac {1}{x^3 \left (x-x^3\right )} \, dx=-\frac {1}{3 x^3}-\frac {1}{x}+\text {arctanh}(x) \]

[Out]

-1/3/x^3-1/x+arctanh(x)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {1598, 331, 212} \[ \int \frac {1}{x^3 \left (x-x^3\right )} \, dx=\text {arctanh}(x)-\frac {1}{3 x^3}-\frac {1}{x} \]

[In]

Int[1/(x^3*(x - x^3)),x]

[Out]

-1/3*1/x^3 - x^(-1) + ArcTanh[x]

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 331

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c*x)^(m + 1)*((a + b*x^n)^(p + 1)/(a*c
*(m + 1))), x] - Dist[b*((m + n*(p + 1) + 1)/(a*c^n*(m + 1))), Int[(c*x)^(m + n)*(a + b*x^n)^p, x], x] /; Free
Q[{a, b, c, p}, x] && IGtQ[n, 0] && LtQ[m, -1] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 1598

Int[(u_.)*(x_)^(m_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(m + n*p)*(a + b*x^(q -
 p))^n, x] /; FreeQ[{a, b, m, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rubi steps \begin{align*} \text {integral}& = \int \frac {1}{x^4 \left (1-x^2\right )} \, dx \\ & = -\frac {1}{3 x^3}+\int \frac {1}{x^2 \left (1-x^2\right )} \, dx \\ & = -\frac {1}{3 x^3}-\frac {1}{x}+\int \frac {1}{1-x^2} \, dx \\ & = -\frac {1}{3 x^3}-\frac {1}{x}+\tanh ^{-1}(x) \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(31\) vs. \(2(15)=30\).

Time = 0.01 (sec) , antiderivative size = 31, normalized size of antiderivative = 2.07 \[ \int \frac {1}{x^3 \left (x-x^3\right )} \, dx=-\frac {1}{3 x^3}-\frac {1}{x}-\frac {1}{2} \log (1-x)+\frac {1}{2} \log (1+x) \]

[In]

Integrate[1/(x^3*(x - x^3)),x]

[Out]

-1/3*1/x^3 - x^(-1) - Log[1 - x]/2 + Log[1 + x]/2

Maple [C] (verified)

Result contains complex when optimal does not.

Time = 2.21 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.47

method result size
meijerg \(-\frac {i \left (-\frac {2 i}{x}-\frac {2 i}{3 x^{3}}+2 i \operatorname {arctanh}\left (x \right )\right )}{2}\) \(22\)
default \(-\frac {1}{3 x^{3}}-\frac {1}{x}-\frac {\ln \left (-1+x \right )}{2}+\frac {\ln \left (1+x \right )}{2}\) \(24\)
norman \(\frac {-\frac {1}{3}-x^{2}}{x^{3}}-\frac {\ln \left (-1+x \right )}{2}+\frac {\ln \left (1+x \right )}{2}\) \(25\)
risch \(\frac {-\frac {1}{3}-x^{2}}{x^{3}}-\frac {\ln \left (-1+x \right )}{2}+\frac {\ln \left (1+x \right )}{2}\) \(25\)
parallelrisch \(\frac {3 \ln \left (1+x \right ) x^{3}-3 \ln \left (-1+x \right ) x^{3}-2-6 x^{2}}{6 x^{3}}\) \(31\)

[In]

int(1/x^3/(-x^3+x),x,method=_RETURNVERBOSE)

[Out]

-1/2*I*(-2*I/x-2/3*I/x^3+2*I*arctanh(x))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 30 vs. \(2 (13) = 26\).

Time = 0.26 (sec) , antiderivative size = 30, normalized size of antiderivative = 2.00 \[ \int \frac {1}{x^3 \left (x-x^3\right )} \, dx=\frac {3 \, x^{3} \log \left (x + 1\right ) - 3 \, x^{3} \log \left (x - 1\right ) - 6 \, x^{2} - 2}{6 \, x^{3}} \]

[In]

integrate(1/x^3/(-x^3+x),x, algorithm="fricas")

[Out]

1/6*(3*x^3*log(x + 1) - 3*x^3*log(x - 1) - 6*x^2 - 2)/x^3

Sympy [A] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.60 \[ \int \frac {1}{x^3 \left (x-x^3\right )} \, dx=- \frac {\log {\left (x - 1 \right )}}{2} + \frac {\log {\left (x + 1 \right )}}{2} - \frac {3 x^{2} + 1}{3 x^{3}} \]

[In]

integrate(1/x**3/(-x**3+x),x)

[Out]

-log(x - 1)/2 + log(x + 1)/2 - (3*x**2 + 1)/(3*x**3)

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.67 \[ \int \frac {1}{x^3 \left (x-x^3\right )} \, dx=-\frac {3 \, x^{2} + 1}{3 \, x^{3}} + \frac {1}{2} \, \log \left (x + 1\right ) - \frac {1}{2} \, \log \left (x - 1\right ) \]

[In]

integrate(1/x^3/(-x^3+x),x, algorithm="maxima")

[Out]

-1/3*(3*x^2 + 1)/x^3 + 1/2*log(x + 1) - 1/2*log(x - 1)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 27 vs. \(2 (13) = 26\).

Time = 0.27 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.80 \[ \int \frac {1}{x^3 \left (x-x^3\right )} \, dx=-\frac {3 \, x^{2} + 1}{3 \, x^{3}} + \frac {1}{2} \, \log \left ({\left | x + 1 \right |}\right ) - \frac {1}{2} \, \log \left ({\left | x - 1 \right |}\right ) \]

[In]

integrate(1/x^3/(-x^3+x),x, algorithm="giac")

[Out]

-1/3*(3*x^2 + 1)/x^3 + 1/2*log(abs(x + 1)) - 1/2*log(abs(x - 1))

Mupad [B] (verification not implemented)

Time = 9.05 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.87 \[ \int \frac {1}{x^3 \left (x-x^3\right )} \, dx=\mathrm {atanh}\left (x\right )-\frac {x^2+\frac {1}{3}}{x^3} \]

[In]

int(1/(x^3*(x - x^3)),x)

[Out]

atanh(x) - (x^2 + 1/3)/x^3